$(function () {
    var url = decodeURIComponent(location.search); //获取url中"?"符后的字串
    var urlPram = url.split("?")[1];

    $("#column").jqGrid({
        url: 'sys/generator/dict?' + urlPram,
        datatype: "json",
        colModel: [{label: '列名', name: 'col_code', width: 80, key: true},
            {label: '备注', name: 'col_name', width: 80},
            {label: '类型', name: 'col_type', width: 70},
            {label: '数据长度', name: 'data_length', width: 40},
            {label: '数据精度', name: 'data_precision', width: 40},
            {label: '是否可空', name: 'nullable', width: 40},
            {label: '是否主键', name: 'pk', width: 40}],
        viewrecords: true,
        height: 380,
       //rowNum: 10,
       //rowList: [10, 30, 50, 100, 200],
        rownumbers: true,
        rownumWidth: 50,
        autowidth: true,
        multiselect: false,
        //pager: "#jqGridPager",
        jsonReader: {
            root: "page.list"//, page: "page.currPage", total: "page.totalPage", records: "page.totalCount"
        },
        // prmNames: {
        //     page: "page", rows: "limit", order: "order"
        // },
        gridComplete: function () {
            //隐藏grid底部滚动条
            $("#dict").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"});
        }
    });
});

